import { BASE } from "@/api/config/servicePort";
import http from "@/api";
import { AssetPanel } from "@/api/interface/asset";
// import { ResultData } from "@/api/interface/index";

// 机房视图统计
export const _getSlaverStatistic = params => {
  return http.get<AssetPanel.slaverStatistic[]>(BASE + `/asset/slaver_statistic/`, params);
};

// 资源统计列表
export const _getResourceStatistic = params => {
  return http.get(BASE + `/asset/resource_statistic/`, params);
};

// 机房机柜筛选项
export const _getFilterStatistic = (params?: object) => {
  return http.get<AssetPanel.filterStatisticFields[]>(BASE + `/asset/filter_statistic_fields/`, params);
};

// 机房详情
export const _getResourceDetail = params => {
  return http.get(BASE + `/asset/resource_detail/`, params);
};

// 设备详情
export const _getAssetDetail = id => {
  return http.get(BASE + `/ops/api/resource/resource/asset/${id}/`);
};

// 批量查询设备详情
export const _getAssetDetailList = data => {
  return http.post(BASE + `/ops/api/resource/resource/assets_details/`, data);
};
